package com.cskaoyan.mapper;

import com.cskaoyan.bean.User;
import com.cskaoyan.bean.UserExample;
import com.cskaoyan.bean.UserRows;
import com.cskaoyan.bean.WxUserInfoBean;
import org.apache.ibatis.annotations.Param;


import java.util.List;

public interface UserMapper {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    List<User> select(@Param("sort") String sort, @Param("order") String order, @Param("username") String username, @Param("mobile") String mobile);


    List<UserRows> statUser();

    int queryUserByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    int queryUserIdByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    WxUserInfoBean queryUserInfoByUserId(Integer userId);

    String queryUserNameById(Integer userId);
}